package com.example.permission.util;

public class PageHelper {

    public static int calculateOffset(int page, int pageSize) {
        return (page - 1) * pageSize;
    }

    public static int calculateTotalPages(int totalCount, int pageSize) {
        return (int) Math.ceil((double) totalCount / pageSize);
    }
}